<template>
    <div>
        <el-card>
            <ReturnPage></ReturnPage>
            <!-- 头部功能区 -->
            <el-row>
                <el-form inline>
                    <!-- 新增搜索 -->
                    <el-form-item>
                        <el-input size="mini"
                                  placeholder="请输入报告名称" />
                    </el-form-item>
                    <el-form-item>
                        <el-input size="mini"
                                  placeholder="请输入键值" />
                    </el-form-item>
                    <el-form-item>
                        <el-input size="mini"
                                  placeholder="请输入触发器" />
                    </el-form-item>
                    <el-form-item>
                        <el-input size="mini"
                                  placeholder="请输入趋势" />
                    </el-form-item>
                    <el-form-item>
                        <el-button type="primary"
                                   icon="el-icon-search"
                                   size="mini">搜索</el-button>
                        <el-button type="primary"
                                   size="mini"
                                   @click="DialogVisible()">创建监控项</el-button>
                    </el-form-item>
                </el-form>
            </el-row>
            <!-- 列表 -->
            <el-row>
                <el-table :data="tableData"
                          style="width: 100%"
                          height="calc(100vh - 250px)"
                          :cell-style="cellStyle"
                          :default-sort="{ prop: 'date', order: 'descending' }"
                          @row-click="rowClick">
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="reportname"
                                     label="名称"
                                     align="center">
                        <template slot-scope="scope">
                            <el-tag type="primary">{{ scope.row.name }}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="trigger"
                                     align="center"
                                     label="触发器">
                        <template slot-scope="scope">
                            <el-tag type="success">{{ scope.row.trigger }}</el-tag>
                        </template>
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="key"
                                     align="center"
                                     label="键值">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="interval"
                                     align="center"
                                     label="间隔">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="history"
                                     align="center"
                                     label="历史记录">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="trend"
                                     align="center"
                                     label="趋势">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="type"
                                     align="center"
                                     label="类型">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="status"
                                     align="center"
                                     label="状态">
                    </el-table-column>
                    <el-table-column show-overflow-tooltip="ture"
                                     prop="mark"
                                     align="center"
                                     label="标记">
                    </el-table-column>
                </el-table>
            </el-row>
        </el-card>
    </div>
</template>
<script>
    export default {
        data () {
            return {
                //列表数据
                tableData: [
                    {
                        name: "Active virtual pages",
                        trigger: "触发器1",
                        key: "system.stat[memory,avm]",
                        interval: "1m",
                        history: "1w",
                        trend: '365d',
                        type: 'Zabbix 客户端',
                        status: '已使用',
                        mark: 'component: memory'
                    },
                    {
                        name: "Active virtual pages",
                        trigger: "触发器1",
                        key: "system.stat[memory,avm]",
                        interval: "1m",
                        history: "1w",
                        trend: '365d',
                        type: 'Zabbix 客户端',
                        status: '已使用',
                        mark: 'component: memory'
                    },
                ],

            };
        },
        methods: {
            //创建监控项目
            DialogVisible () {
                this.$router.push({
                    path: "AddDialogVisible",
                });
            }

        },
        created () { },
        computed: {},
    };
</script>
<style lang="scss" scoped></style>
